package com.xiao.xin.core.Util;

import com.xiao.xin.core.domain.User;

/***
 * ThreadLocal工具类
 */
public class UserThreadLocal {
    private static final ThreadLocal<User> local = new ThreadLocal<>();

    public static void setUser(User user) {
        local.set(user);
    }

    public static User getUser() {
        return local.get();
    }

    public static void removeUser() {
        local.remove();
    }
}
